package com.jh.user.repository;

import com.jh.user.pojo.RealNameAuthPhoto;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * @author zhugu
 * @version 1.0
 * 2018/12/17 16:37
 */
@Repository
public interface RealNameAuthPhotoRepository extends JpaRepository<RealNameAuthPhoto, Long>, JpaSpecificationExecutor<RealNameAuthPhoto> {
    @Query("select r from RealNameAuthPhoto r where r.userId = :userId")
    RealNameAuthPhoto findByUserId(@Param("userId") long userId);
}
